/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.scalia.meteocal.control;

import java.util.HashMap;
import java.util.Map;
import javax.ejb.Stateless;

/**
 *
 * @author gabriele
 */
@Stateless
public class PlaceManager {
    public Map<String,String> getCountries() {
        Map<String,String> countries = new HashMap<>();
        countries.put("Italy", "Italy");
        countries.put("USA", "USA");
        countries.put("France", "France");
        return countries;
    }
    
    public Map<String,String> getCities(String country) {
        Map<String,String> cities = new HashMap<>();
        if (country.equals("Italy")) {
            cities.put("Milan", "Milan");
            cities.put("Rome", "Rome");
            cities.put("Florence", "Florences");
        }
        else if (country.equals("USA")) {
            cities.put("New York", "New York");
            cities.put("San Francisco", "San Francisco");
            cities.put("Washington", "Washington");
        }
        else if (country.equals("France")) {
            cities.put("Paris", "Paris");
            cities.put("Bordeaux", "Bordeaux");
            cities.put("Nantes", "Nantes");
        }
        return cities;
    }
}
